Compression techniques for video and images generally are best suited to particular types of image content, and are less effective or even ineffective on other types. For example, one common image content type is generally referred to as “continuous tone.” Continuous tone content is typified by photographic images, where color perceptually varies continuously across the image. With continuous tone content, the color depth or resolution of a pixel (i.e., the number of possible color values for the pixel) in the image generally is comparatively larger than the number of pixels (spatial resolution) of the image. A common example may be a digital photograph having 800×600 pixel spatial resolution (i.e., 480,000 pixels), where each pixel has a 24-bit color value (allowing 16,777,216 possible colors).
On the other hand, another common image content type is referred to herein as palettized image content. Palettized image content is perhaps most typically encountered in computer screen displays, where the graphical user interface may generally consist of window areas containing generally flat color backgrounds, icons and text. The colors of such palettized content displays are selected from a smaller sub-set of discrete colors (referred to as the color palette), which in some computers may be mapped to the larger color space of displayable colors via a color look-up table or the like. In a simple case, there may be only two colors present in the palettized image. For palettized image content, the number of possible colors that the pixels can assume is small compared to the number of pixels. A common example may be an 800×600 screen display, where pixels have 8-bit color values (permitting only 256 discrete colors).
Many common image compression techniques apply a block-based linear transform (e.g., the discrete cosine transform (DCT) used in the JPEG, MPEG and H.261 compression standards) with quantization of transform coefficients to achieve lossy compression of image data. These techniques are well suited to compressing continuous tone image content, but have drawbacks when applied to palettized content. One drawback to these transform-based compression techniques when applied to palettized content is that the quantization of high frequency transform coefficients has the effect of distorting or blurring discontinuities in color such as at edges of text, window and icon button borders and the like in palettized content, because quantization tends to blur such locations of high color variation. The edge blurring can be readily perceptible to the viewer, resulting in significant degradation of image quality, unless the quantization (and resulting compression) is significantly reduced.
Other image compression techniques, such as those based on adaptive entropy encoding techniques (e.g., run length encoding, Huffman codes, etc.), are well suited to compressing palettized image content. In general, these adaptive entropy encoding techniques achieve compression by utilizing encoding schemes that assign codes whose length relates inversely to the frequency of occurrence of the encoded information (e.g., assigning shorter codes to more frequently occurring color values, or runs of color values). Pixels in continuous tone content, however, tend to vary in color continuously across the image, so that the continuous tone content generally does not contain highly repetitive pixel colors to compress via shorter encodings. Consequently, these adaptive entropy encoding techniques are not well suited to compressing continuous tone content.
Images containing a mixture of continuous tone content and palettized content are now quite common. Examples include screen capture images, web pages, educational and training videos (especially those containing screen capture images or web pages), and business presentations, among others. In the case of screen capture images, it is now common for photographs to be used as background images of the desktop display or in windows of a computer's graphical user interface. Web pages often include photographs interspersed among text and other palettized content.